<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// #ifdef MP-WEIXIN
			// if (this.$cache.getCache('token') == null) {
			uni.login({
				provider: 'weixin',
				success: (res) => {
					this.$func.request('/auth/openid', {
						code: res.code,
					}, 'POST').then(res => {
						this.$cache.setCache('openid', res.data.openid, 85000)
						if (res.data.token) {
							this.$cache.setCache('youthToken', res.data.token, 85000)
							// this.$func.request('/user/visit_record').then(res => {
							// })
						}
					})
				},
				fail: err => {}
			})
			// }
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>
<style lang="scss">
	/deep/image {
		height: auto;
	}

	/*每个页面公共css */
	@import "@/node_modules/uview-ui/index.scss";

	.noMore {
		font-size: 32rpx;
		text-align: center;
		color: rgb(197, 191, 191);
		margin-top: 10vh;
	}

	// 底部导航样式
	.bottom-nav-box {
		box-shadow: rgba(0, 0, 0, 0.3) 0rpx 8rpx 20rpx 0rpx;
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		padding: 20rpx 0 40rpx;
		z-index: 999;
		background-color: #fff;
	}

	.bottom-nav-list {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: center;
		flex: 1;
	}

	.bottom-nav-icon {
		width: 100%;
		height: 48rpx;
	}

	.bottom-nav-img {
		height: 76rpx;
		width: 76rpx;
		vertical-align: top;
	}

	.bottom-nav-text {
		font-size: 24rpx;
		color: #C1C4CC;
		margin-top: 8rpx;
	}

	.bottom-nav-active {
		color: #216AFB;
		font-weight: bold;
	}
</style>